{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# _*Max-Cut and Traveling Salesman Problem*_ "
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Introduction\n",
    "\n",
    "Many problems in quantitative fields such as finance and engineering are optimization problems. Optimization problems lie at the core of complex decision-making and definition of strategies. \n",
    "\n",
    "Optimization (or combinatorial optimization) means searching for an optimal solution in a finite or countably infinite set of potential solutions. Optimality is defined with respect to some criterion function, which is to be minimized or maximized. This is typically called cost function or objective function. \n",
    "\n",
    "**Typical optimization problems**\n",
    "\n",
    "Minimization: cost, distance, length of a traversal, weight, processing time, material, energy consumption, number of objects\n",
    "\n",
    "Maximization: profit, value, output, return, yield, utility, efficiency, capacity, number of objects \n",
    "\n",
    "We consider here max-cut problems of practical interest in many fields, and show how they can be mapped on quantum computers manually and how Qiskit's optimization module supports this.\n",
    "\n",
    "\n",
    "### Weighted Max-Cut\n",
    "\n",
    "Max-Cut is an NP-complete problem, with applications in clustering, network science, and statistical physics. To grasp how practical applications are mapped into given Max-Cut instances, consider a system of many people that can interact and influence each other. Individuals can be represented by vertices of a graph, and their interactions seen as pairwise connections between vertices of the graph, or edges. With this representation in mind, it is easy to model typical marketing problems. For example, suppose that it is assumed that individuals will influence each other's buying decisions, and knowledge is given about how strong they will influence each other. The influence can be modeled by weights assigned on each edge of the graph. It is possible then to predict the outcome of a marketing strategy in which products are offered for free to some individuals, and then ask which is the optimal subset of individuals that should get the free products, in order to maximize revenues.\n",
    "\n",
    "The formal definition of this problem is the following:\n",
    "\n",
    "Consider an $n$-node undirected graph *G = (V, E)* where *|V| = n* with edge weights $w_{ij}>0$, $w_{ij}=w_{ji}$, for $(i, j)\\in E$. A cut is defined as a partition of the original set V into two subsets. The cost function to be optimized is in this case the sum of weights of edges connecting points in the two different subsets, *crossing* the cut. By assigning $x_i=0$ or $x_i=1$ to each node $i$, one tries to maximize the global profit function (here and in the following summations run over indices 0,1,...n-1)\n",
    "\n",
    "$$\\tilde{C}(\\textbf{x}) = \\sum_{i,j} w_{ij} x_i (1-x_j).$$\n",
    "\n",
    "In our simple marketing model, $w_{ij}$ represents the probability that the person $j$ will buy a product after $i$ gets a free one. Note that the weights $w_{ij}$ can in principle be greater than $1$ (or even negative), corresponding to the case where the individual $j$ will buy more than one product. Maximizing the total buying probability corresponds to maximizing the total future revenues. In the case where the profit probability will be greater than the cost of the initial free samples, the strategy is a convenient one. An extension to this model has the nodes themselves carry weights, which can be regarded, in our marketing model, as the likelihood that a person granted with a free sample of the product will buy it again in the future. With this additional information in our model, the objective function to maximize becomes \n",
    "\n",
    "$$C(\\textbf{x}) = \\sum_{i,j} w_{ij} x_i (1-x_j)+\\sum_i w_i x_i. $$\n",
    " \n",
    "In order to find a solution to this problem on a quantum computer, one needs first to map it to an Ising Hamiltonian. This can be done with the assignment $x_i\\rightarrow (1-Z_i)/2$, where $Z_i$ is the Pauli Z operator that has eigenvalues $\\pm 1$. Doing this we find that \n",
    "\n",
    "$$C(\\textbf{Z}) = \\sum_{i,j} \\frac{w_{ij}}{4} (1-Z_i)(1+Z_j) + \\sum_i \\frac{w_i}{2} (1-Z_i) = -\\frac{1}{2}\\left( \\sum_{i<j} w_{ij} Z_i Z_j +\\sum_i w_i Z_i\\right)+\\mathrm{const},$$\n",
    "\n",
    "where $\\mathrm{const} = \\sum_{i<j}w_{ij}/2+\\sum_i w_i/2$. In other terms, the weighted Max-Cut problem is equivalent to minimizing the Ising Hamiltonian \n",
    "\n",
    "$$ H = \\sum_i w_i Z_i + \\sum_{i<j} w_{ij} Z_iZ_j.$$\n",
    "\n",
    "Qiskit's optimization module can generate the Ising Hamiltonian for the first profit function $\\tilde{C}$.\n",
    "To this extent, function $\\tilde{C}$ can be modeled as a `QuadraticProgram`, which provides the `to_ising()` method.\n",
    "\n",
    "\n",
    "### Approximate Universal Quantum Computing for Optimization Problems\n",
    "\n",
    "There has been a considerable amount of interest in recent times about the use of quantum computers to find a solution to combinatorial optimization problems. It is important to say that, given the classical nature of combinatorial problems, exponential speedup in using quantum computers compared to the best classical algorithms is not guaranteed. However, due to the nature and importance of the target problems, it is worth investigating heuristic approaches on a quantum computer that could indeed speed up some problem instances. Here we demonstrate an approach that is based on the *Quantum Approximate Optimization Algorithm* (QAOA) by Farhi, Goldstone, and Gutmann (2014). We frame the algorithm in the context of *approximate quantum computing*, given its heuristic nature. \n",
    "\n",
    "The algorithm works as follows:\n",
    "\n",
    "1. Choose the $w_i$ and $w_{ij}$ in the target Ising problem. In principle, even higher powers of Z are allowed.\n",
    "\n",
    "1. Choose the depth of the quantum circuit $m$. Note that the depth can be modified adaptively.\n",
    "\n",
    "1. Choose a set of controls $\\theta$ and make a trial function $|\\psi(\\boldsymbol\\theta)\\rangle$, built using a quantum circuit made of C-Phase gates and single-qubit Y rotations, parameterized by the components of $\\boldsymbol\\theta$. \n",
    "\n",
    "1. Evaluate \n",
    "$$C(\\boldsymbol\\theta) = \\langle\\psi(\\boldsymbol\\theta)~|H|~\\psi(\\boldsymbol\\theta)\\rangle = \\sum_i w_i \\langle\\psi(\\boldsymbol\\theta)~|Z_i|~\\psi(\\boldsymbol\\theta)\\rangle+ \\sum_{i<j} w_{ij} \\langle\\psi(\\boldsymbol\\theta)~|Z_iZ_j|~\\psi(\\boldsymbol\\theta)\\rangle$$ \n",
    "by sampling the outcome of the circuit in the Z-basis and adding the expectation values of the individual Ising terms together. In general, different control points around $\\boldsymbol\\theta$ have to be estimated, depending on the classical optimizer chosen. \n",
    "\n",
    "1. Use a classical optimizer to choose a new set of controls.\n",
    "\n",
    "1. Continue until $C(\\boldsymbol\\theta)$ reaches a minimum, close enough to the solution $\\boldsymbol\\theta^*$.\n",
    "\n",
    "1. Use the last $\\boldsymbol\\theta$ to generate a final set of samples from the distribution $|\\langle z_i~|\\psi(\\boldsymbol\\theta)\\rangle|^2\\;\\forall i$ to obtain the answer.\n",
    "    \n",
    "It is our belief the difficulty of finding good heuristic algorithms will come down to the choice of an appropriate trial wavefunction. For example, one could consider a trial function whose entanglement best aligns with the target problem, or simply make the amount of entanglement a variable. In this tutorial, we will consider a simple trial function of the form\n",
    "\n",
    "$$|\\psi(\\theta)\\rangle  = [U_\\mathrm{single}(\\boldsymbol\\theta) U_\\mathrm{entangler}]^m |+\\rangle$$\n",
    "\n",
    "where $U_\\mathrm{entangler}$ is a collection of C-Phase gates (fully entangling gates), and $U_\\mathrm{single}(\\theta) = \\prod_{i=1}^n Y(\\theta_{i})$, where $n$ is the number of qubits and $m$ is the depth of the quantum circuit. The motivation for this choice is that for these classical problems this choice allows us to search over the space of quantum states that have only real coefficients, still exploiting the entanglement to potentially converge faster to the solution.\n",
    "\n",
    "One advantage of using this sampling method compared to adiabatic approaches is that the target Ising Hamiltonian does not have to be implemented directly on hardware, allowing this algorithm not to be limited to the connectivity of the device. Furthermore, higher-order terms in the cost function, such as $Z_iZ_jZ_k$, can also be sampled efficiently, whereas in adiabatic or annealing approaches they are generally impractical to deal with. \n",
    "\n",
    "\n",
    "References:\n",
    "- A. Lucas, Frontiers in Physics 2, 5 (2014)\n",
    "- E. Farhi, J. Goldstone, S. Gutmann e-print arXiv 1411.4028 (2014)\n",
    "- D. Wecker, M. B. Hastings, M. Troyer Phys. Rev. A 94, 022309 (2016)\n",
    "- E. Farhi, J. Goldstone, S. Gutmann, H. Neven e-print arXiv 1703.06199 (2017)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "# useful additional packages \n",
    "import matplotlib.pyplot as plt\n",
    "import matplotlib.axes as axes\n",
    "%matplotlib inline\n",
    "import numpy as np\n",
    "import networkx as nx\n",
    "\n",
    "from qiskit import Aer\n",
    "from qiskit.tools.visualization import plot_histogram\n",
    "from qiskit.circuit.library import TwoLocal\n",
    "from qiskit.optimization.applications.ising import max_cut, tsp\n",
    "from qiskit.aqua.algorithms import VQE, NumPyMinimumEigensolver\n",
    "from qiskit.aqua.components.optimizers import SPSA\n",
    "from qiskit.aqua import aqua_globals\n",
    "from qiskit.aqua import QuantumInstance\n",
    "from qiskit.optimization.applications.ising.common import sample_most_likely\n",
    "from qiskit.optimization.algorithms import MinimumEigenOptimizer\n",
    "from qiskit.optimization.problems import QuadraticProgram\n",
    "\n",
    "# setup aqua logging\n",
    "import logging\n",
    "from qiskit.aqua import set_qiskit_aqua_logging\n",
    "# set_qiskit_aqua_logging(logging.DEBUG)  # choose INFO, DEBUG to see the log"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Max-Cut problem"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAV0AAADnCAYAAAC9roUQAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuMCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy86wFpkAAAACXBIWXMAAAsTAAALEwEAmpwYAAA2TElEQVR4nO3deXzU1b3/8ddkX0gCIWQjIQlb9pXMdxBREFERUZC6IPZyXSi1LtSF64JoKWrtdrvd2utte+21+mtr762PiorVWm2ttSWZ7AlhCQRIQhZCIMtMkklmvr8/vuZbohAChPnODJ/n4+FDJZn5nmB8c/I553yOSVVVhBBCuIef0QMQQoiLiYSuEEK4kYSuEEK4kYSuEEK4kYSuEEK4UcBYH4yJiVFTU1PdNBQhhHCTY8egtVX7Z3//8b9OVcHphKAgSEvT/n4KZWVlnaqqTjvVx8YM3dTUVKxW6/gHJIQQnu7FF+E734H0dAgMPLf3OHFCC9zXX4cZMz73YZPJdOh0L5XyghDi4vH++1rgRkSce+ACTJ4M3d2wbh0MDJzVSyV0hRAXh64u2LQJQkIgYMwf8scnKgqamuD73z+rl0noCiEuDj/4AfT2QmjoxL1nZCS89BI0No77JRK6Qgjf19cH//u/WllhIvn7g8sFr7467pdI6AohfN9778Hw8LjKCk+1tHDNvn1cvmcPq/fv5/cnToz9gkmT4De/gaGhcQ1lAgobQgjh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Q3AxjnTAD/ruzk592dur/vqO7mw0xMWyYNu30L+rvhyuuGNdQhBDCm41/n+66dfD1r5/x0zZMmzZ2wH6Wqmq13LVrx/8aIYTwUuM/eXDDDdoOg6GhiR2B3Q7x8VqDcyGE8HHjD93ISHjkEa2H7jhqu+Picmkh/txzZ91lTAghvNHZJd2dd0J2NnR3n/+TRw5ErFwJl19+/u8nhBBe4OxC198f/uu/ICbm/IJ3JHBzc+GZZ879fYQQwsuc/c/08fHw+uswfTocP67dIHE2hoa0wC0u1pqXn2E3hBBC+JIx++maTKajwCH3DUcIIXxCiqqqp9zGNWboCiGEmFiyZUAIIdxIQlcIIdxIQlcIIdxIQlcIIdxIQlcIIdzo/wMEwtbcVm4IXwAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "# Generating a graph of 4 nodes \n",
    "\n",
    "n=4 # Number of nodes in graph\n",
    "G=nx.Graph()\n",
    "G.add_nodes_from(np.arange(0,n,1))\n",
    "elist=[(0,1,1.0),(0,2,1.0),(0,3,1.0),(1,2,1.0),(2,3,1.0)]\n",
    "# tuple is (i,j,weight) where (i,j) is the edge\n",
    "G.add_weighted_edges_from(elist)\n",
    "\n",
    "colors = ['r' for node in G.nodes()]\n",
    "pos = nx.spring_layout(G)\n",
    "\n",
    "def draw_graph(G, colors, pos):\n",
    "    default_axes = plt.axes(frameon=True)\n",
    "    nx.draw_networkx(G, node_color=colors, node_size=600, alpha=.8, ax=default_axes, pos=pos)\n",
    "    edge_labels = nx.get_edge_attributes(G, 'weight')\n",
    "    nx.draw_networkx_edge_labels(G, pos=pos, edge_labels=edge_labels)\n",
    "    \n",
    "draw_graph(G, colors, pos)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {
    "tags": []
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[[0. 1. 1. 1.]\n",
      " [1. 0. 1. 0.]\n",
      " [1. 1. 0. 1.]\n",
      " [1. 0. 1. 0.]]\n"
     ]
    }
   ],
   "source": [
    "# Computing the weight matrix from the random graph\n",
    "w = np.zeros([n,n])\n",
    "for i in range(n):\n",
    "    for j in range(n):\n",
    "        temp = G.get_edge_data(i,j,default=0)\n",
    "        if temp != 0:\n",
    "            w[i,j] = temp['weight'] \n",
    "print(w)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Brute force approach\n",
    "\n",
    "Try all possible $2^n$ combinations. For $n = 4$, as in this example, one deals with only 16 combinations, but for n = 1000, one has 1.071509e+30 combinations, which is impractical to deal with by using a brute force approach. "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {
    "tags": []
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "case = [0, 0, 0, 0] cost = 0.0\n",
      "case = [1, 0, 0, 0] cost = 3.0\n",
      "case = [0, 1, 0, 0] cost = 2.0\n",
      "case = [1, 1, 0, 0] cost = 3.0\n",
      "case = [0, 0, 1, 0] cost = 3.0\n",
      "case = [1, 0, 1, 0] cost = 4.0\n",
      "case = [0, 1, 1, 0] cost = 3.0\n",
      "case = [1, 1, 1, 0] cost = 2.0\n",
      "case = [0, 0, 0, 1] cost = 2.0\n",
      "case = [1, 0, 0, 1] cost = 3.0\n",
      "case = [0, 1, 0, 1] cost = 4.0\n",
      "case = [1, 1, 0, 1] cost = 3.0\n",
      "case = [0, 0, 1, 1] cost = 3.0\n",
      "case = [1, 0, 1, 1] cost = 2.0\n",
      "case = [0, 1, 1, 1] cost = 3.0\n",
      "case = [1, 1, 1, 1] cost = 0.0\n",
      "\n",
      "Best solution = [1, 0, 1, 0] cost = 4.0\n"
     ]
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAV0AAADnCAYAAAC9roUQAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuMCwgaH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d0ZU1R3izz8/6y5jQgjhj2aXdHfdBfn5MDR09k+ePBCxYQNcfPHZv58QQviB2YWu0Qj/5/9AfPzZBe9k4BYWwrPPnvn7CCGEn5n9z/RJSfDrX8PixTAw4L5BYjacTnfglpe7m5efZjeEEELMJ9P20zUYDEeBQ54bjhBCzAtpmqaddBvXtKErhBBibsmWASGE8CAJXSGE8CAJXSGE8CAJXSGE8CAJXSGE8KD/D3lTWIqCvdD0AAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "best_cost_brute = 0\n",
    "for b in range(2**n):\n",
    "    x = [int(t) for t in reversed(list(bin(b)[2:].zfill(n)))]\n",
    "    cost = 0\n",
    "    for i in range(n):\n",
    "        for j in range(n):\n",
    "            cost = cost + w[i,j]*x[i]*(1-x[j])\n",
    "    if best_cost_brute < cost:\n",
    "        best_cost_brute = cost\n",
    "        xbest_brute = x \n",
    "    print('case = ' + str(x)+ ' cost = ' + str(cost))\n",
    "\n",
    "colors = ['r' if xbest_brute[i] == 0 else 'c' for i in range(n)]\n",
    "draw_graph(G, colors, pos)\n",
    "print('\\nBest solution = ' + str(xbest_brute) + ' cost = ' + str(best_cost_brute))    "
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Mapping to the Ising problem"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Qiskit provides functionality to directly generate the Ising Hamiltonian as well as create the corresponding `QuadraticProgram`. "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {
    "tags": []
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Offset: -2.5\n",
      "Ising Hamiltonian:\n",
      "IIZZ\t(0.5+0j)\n",
      "IZIZ\t(0.5+0j)\n",
      "IZZI\t(0.5+0j)\n",
      "ZIIZ\t(0.5+0j)\n",
      "ZZII\t(0.5+0j)\n",
      "\n"
     ]
    }
   ],
   "source": [
    "qubitOp, offset = max_cut.get_operator(w)\n",
    "print('Offset:', offset)\n",
    "print('Ising Hamiltonian:')\n",
    "print(qubitOp.print_details())"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {
    "tags": []
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "// This file has been generated by DOcplex\n",
      "// model name is: AnonymousModel\n",
      "// single vars section\n",
      "dvar bool x_0;\n",
      "dvar bool x_1;\n",
      "dvar bool x_2;\n",
      "dvar bool x_3;\n",
      "\n",
      "minimize\n",
      " [ - 3 x_0^2 + 2 x_0*x_1 + 2 x_0*x_2 + 2 x_0*x_3 - 2 x_1^2 + 2 x_1*x_2\n",
      " - 3 x_2^2 + 2 x_2*x_3 - 2 x_3^2 ];\n",
      " \n",
      "subject to {\n",
      "\n",
      "}\n"
     ]
    }
   ],
   "source": [
    "# mapping Ising Hamiltonian to Quadratic Program\n",
    "qp = QuadraticProgram()\n",
    "qp.from_ising(qubitOp, offset)\n",
    "qp.to_docplex().prettyprint()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {
    "tags": []
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "optimal function value: -4.0\n",
      "optimal value: [1. 0. 1. 0.]\n",
      "status: SUCCESS\n"
     ]
    }
   ],
   "source": [
    "# solving Quadratic Program using exact classical eigensolver\n",
    "exact = MinimumEigenOptimizer(NumPyMinimumEigensolver())\n",
    "result = exact.solve(qp)\n",
    "print(result)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Since the problem was cast to a minimization problem, the solution of $-4$ corresponds to the optimum."
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Checking that the full Hamiltonian gives the right cost "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {
    "tags": []
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "energy: -1.5\n",
      "max-cut objective: -4.0\n",
      "solution: [0 1 0 1]\n",
      "solution objective: 4.0\n"
     ]
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAV0AAADnCAYAAAC9roUQAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuMCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy86wFpkAAAACXBIWXMAAAsTAAALEwEAmpwYAAA2+ElEQVR4nO3deXzU5b33/9dMMllJAiFkI5CEJftO5juIqIioqCiUWkU8x9uFUmvVunBccCm32tr29HQ7te2v7e05Vu+etvfRR7Uu1VptreWUZLJvLIFAQshCCGSZyWQy8/3+/hjzLVEIAcJs+TwfDx8PIbNcg/HNlc91XZ/LoGkaQgghvMPo6wEIIcRMIqErhBBeJKErhBBeJKErhBBeJKErhBBeFDrZFxMSErSMjAwvDUUIIbzj2NgYXU4nACEABsOUnqdpGm4gzGAgMzKSsNM8r6qqqk/TtHmn+tqkoZuRkYHVap3SYIQQIhD8tLOTf+3oINtoxGQ8tx/2T7hchIWG8lpBAQsjIj7zdYPBcOh0z5XyghBixni/v59/7eggJiTknAMXYHZoKAMuF7e1tOBwu8/quRK6QogZoX9sjG379xNhMBA6xXLCZOJCQ+kYHeV7hw+f1fMkdIUQM8L3Dx9myO0mMiRk2l4zNiSEF7u6aBsZmfJzJHSFEEFv2OXi//X2EjONgQsQYjCgAq/09Ez5OZMupAkhRDB47/hxXJpG9BTKCp0/+Qn25mbU0VFC4+KYe911zF616rSPn2U08uveXh5buHBKdWIJXSFE0PvriRNMtbVXwvXXY9qyBaPJxOiRIxz6xjcIT08nMjPzlI83GY043G4OOBxkR0Wd8fWlvCCECHo1w8NETHG3QnhaGkaTyfMLgwGDwcBYb++kz9E0jWabbUqvLzNdIUTQ63Y6iTyLLWKdL77I0N/+hjY2RsTChcwqLp708aOaRs8nhy3OREJXCBH0VGCyaq7T6cRms2Gz27HbbLhXrG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maRgMBjbL6TIhxAww5ZMHNyQkEGowMKaq0zoAu6qSHBaGIn0ThBAzwJRDNzY0lIcXLMCmqlOq7U6FqmmMaRpfz8w86y5jQggRiM7qjO0dKSnkR0czcIaFsakYPxCxPiGBS2fPPu/XE0KIQHBWoRtiMPD/ZWWRYDIxcA4HJsaNB25hdDTPZmae8+sIIUSgOetuMsnh4bxWUMD88HCOu1y4z7LUMKaqnHC7KY+J4ZXc3DPuhhBCiGAy6W3ABoPhKHDIe8MRQoigkK5p2rxTfWHS0BVCCDG9pFmtEEJ4kYSuEEJ4kYSuEEJ4kYSuEEJ4kYSuEEJ40f8P3QQ5lPQ7s68AAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "#Making the Hamiltonian in its full form and getting the lowest eigenvalue and eigenvector\n",
    "ee = NumPyMinimumEigensolver(qubitOp)\n",
    "result = ee.run()\n",
    "\n",
    "x = sample_most_likely(result.eigenstate)\n",
    "print('energy:', result.eigenvalue.real)\n",
    "print('max-cut objective:', result.eigenvalue.real + offset)\n",
    "print('solution:', max_cut.get_graph_solution(x))\n",
    "print('solution objective:', max_cut.max_cut_value(x, w))\n",
    "\n",
    "colors = ['r' if max_cut.get_graph_solution(x)[i] == 0 else 'c' for i in range(n)]\n",
    "draw_graph(G, colors, pos)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Running it on quantum computer\n",
    "We run the optimization routine using a feedback loop with a quantum computer that uses trial functions built with Y single-qubit rotations, $U_\\mathrm{single}(\\theta) = \\prod_{i=1}^n Y(\\theta_{i})$, and entangler steps $U_\\mathrm{entangler}$."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [],
   "source": [
    "aqua_globals.random_seed = np.random.default_rng(123)\n",
    "seed = 10598\n",
    "backend = Aer.get_backend('statevector_simulator')\n",
    "quantum_instance = QuantumInstance(backend, seed_simulator=seed, seed_transpiler=seed)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {
    "scrolled": true,
    "tags": [
     "nbsphinx-thumbnail"
    ]
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "energy: -1.499979671893171\n",
      "time: 4.265789747238159\n",
      "max-cut objective: -3.999979671893171\n",
      "solution: [1. 0. 1. 0.]\n",
      "solution objective: 4.0\n"
     ]
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAV0AAADnCAYAAAC9roUQAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuMCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy86wFpkAAAACXBIWXMAAAsTAAALEwEAmpwYAAA3EUlEQVR4nO3dd3xc1Z338c9o1GVVy2qWLcmSrV6tuWOMacZ0sI1DNbteiuMQWgg4gZgSLyVsypLsLuzyJDzZkPBkk+ySVyAEAiGQsISNpVFvLpKbJKtYVp/RaEZz7/PHWHctsGXJlqfIv/frxQtsaeYegfzl6HfO+R2DpmkIIYTwjABvD0AIIc4nErpCCOFBErpCCOFBErpCCOFBErpCCOFBgdN9MD4+XktPT/fQUIQQwkOOHYOuLvc/G40zf52mgcsFwcGQkeH++0lUVVX1aZq26GQfmzZ009PTsVgsMx+QEEL4uldege9+F7KzISjozN5jcNAduL/+NSxd+rkPGwyGQ6d6qZQXhBDnjw8+cAduZOSZBy5ATAwMDcGWLWC3z+qlErpCiPNDfz9s3w6hoRA47Q/5MxMdDe3t8P3vz+plErpCiPPDD34AIyMQFjZ37xkVBT/+MRw4MOOXSOgKIea/0VH4z/90lxXmktEIqgqvvz7jl0joCiHmv/ffh4mJGZUVnurs5Kp9+7h4zx42tbXxm8HB6V+wYAH84hfgdM5oKHNQ2BBCCB/33//t3u41A3fFx/NUUBDBAQEcHB9n26FDZIeEkHuqskRQkHsxbf9+946I05CZrhBi/qupcS+gzcCykBCC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SER4OHGxsYSnprpnwpoGg4MwOgpyB5gQYh6b+Ux3FjRg3OFgxOnk8KFDREREEBkZSWJSEkEnuyXBYIDAQPeJNQldIcQ8NrPQneXilQGIj49Hc7nIWrKEGb9aFsmEEPPczEL3DGafQYGBBMLMAlfTYGICYmNn/RwhhPAnM9sasGKF+xTaNHt6J7k0DYeqogIq4FBVXKd7ncMBiYkQGTmj4QghhL+a2Uw3NBQyM6GjA6Y7YQb8374+ftjXp//6naEhtsXHs23RolO/aGwMLrtsRkMRQgh/NvN9ulu2wN///Wk/bduiRdMH7GdpmruWu3nzzF8jhBB+auYnD9avd+8wcDrndgQ2GyQluRucCyHEPDfz0I2KgkcfdffQnUFtd0ZU1R3izz8/6y5jQgjhj2aXdHfdBfn5MDR09k+ePBCxYQNcfPHZv58QQviB2YWu0Qj/5/9AfPzZBe9k4BYWwrPPnvn7CCGEn5n9z/RJSfDrX8PixTAw4L5BYjacTnfglpe7m5efZjeEEELMJ9P20zUYDEeBQ54bjhBCzAtpmqaddBvXtKErhBBibsmWASGE8CAJXSGE8CAJXSGE8CAJXSGE8CAJXSGE8KD/D3lTWIqCvdD0AAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "# construct VQE\n",
    "spsa = SPSA(maxiter=300)\n",
    "ry = TwoLocal(qubitOp.num_qubits, 'ry', 'cz', reps=5, entanglement='linear')\n",
    "vqe = VQE(qubitOp, ry, spsa, quantum_instance=quantum_instance)\n",
    "\n",
    "# run VQE\n",
    "result = vqe.run(quantum_instance)\n",
    "\n",
    "# print results\n",
    "x = sample_most_likely(result.eigenstate)\n",
    "print('energy:', result.eigenvalue.real)\n",
    "print('time:', result.optimizer_time)\n",
    "print('max-cut objective:', result.eigenvalue.real + offset)\n",
    "print('solution:', max_cut.get_graph_solution(x))\n",
    "print('solution objective:', max_cut.max_cut_value(x, w))\n",
    "\n",
    "# plot results\n",
    "colors = ['r' if max_cut.get_graph_solution(x)[i] == 0 else 'c' for i in range(n)]\n",
    "draw_graph(G, colors, pos)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {
    "tags": []
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "optimal function value: -4.0\n",
      "optimal value: [1. 0. 1. 0.]\n",
      "status: SUCCESS\n"
     ]
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAV0AAADnCAYAAAC9roUQAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuMCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy86wFpkAAAACXBIWXMAAAsTAAALEwEAmpwYAAA3EUlEQVR4nO3dd3xc1Z338c9o1GVVy2qWLcmSrV6tuWOMacZ0sI1DNbteiuMQWgg4gZgSLyVsypLsLuzyJDzZkPBkk+ySVyAEAiGQsISNpVFvLpKbJKtYVp/RaEZz7/PHWHctsGXJlqfIv/frxQtsaeYegfzl6HfO+R2DpmkIIYTwjABvD0AIIc4nErpCCOFBErpCCOFBErpCCOFBErpCCOFBgdN9MD4+XktPT/fQUIQQwkOOHYOuLvc/G40zf52mgcsFwcGQkeH++0lUVVX1aZq26GQfmzZ009PTsVgsMx+QEEL4uldege9+F7KzISjozN5jcNAduL/+NSxd+rkPGwyGQ6d6qZQXhBDnjw8+cAduZOSZBy5ATAwMDcGWLWC3z+qlErpCiPNDfz9s3w6hoRA47Q/5MxMdDe3t8P3vz+plErpCiPPDD34AIyMQFjZ37xkVBT/+MRw4MOOXSOgKIea/0VH4z/90lxXmktEIqgqvvz7jl0joCiHmv/ffh4mJGZUVnurs5Kp9+7h4zx42tbXxm8HB6V+wYAH84hfgdM5oKHNQ2BBCCB/33//t3u41A3fFx/NUUBDBAQEcHB9n26FDZIeEkHuqskRQkHsxbf9+946I05CZrhBi/qupcS+gzcCykBCCA9zRaAAMBgMdp5vFaho0N8/o/WWm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5gQYh6b+Ux3FjRg3OFgxOnk8KFDREREEBkZSWJSEkEnuyXBYIDAQPeJNQldIcQ8NrPQneXilQGIj49Hc7nIWrKEGb9aFsmEEPPczEL3DGafQYGBBMLMAlfTYGICYmNn/RwhhPAnM9sasGKF+xTaNHt6J7k0DYeqogIq4FBVXKd7ncMBiYkQGTmj4QghhL+a2Uw3NBQyM6GjA6Y7YQb8374+ftjXp//6naEhtsXHs23RolO/aGwMLrtsRkMRQgh/NvN9ulu2wN///Wk/bduiRdMH7GdpmruWu3nzzF8jhBB+auYnD9avd+8wcDrndgQ2GyQluRucCyHEPDfz0I2KgkcfdffQnUFtd0ZU1R3izz8/6y5jQgjhj2aXdHfdBfn5MDR09k+ePBCxYQNcfPHZv58QQviB2YWu0Qj/5/9AfPzZBe9k4BYWwrPPnvn7CCGEn5n9z/RJSfDrX8PixTAw4L5BYjacTnfglpe7m5efZjeEEELMJ9P20zUYDEeBQ54bjhBCzAtpmqaddBvXtKErhBBibsmWASGE8CAJXSGE8CAJXSGE8CAJXSGE8CAJXSGE8KD/D3lTWIqCvdD0AAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "# create minimum eigen optimizer based on VQE\n",
    "vqe_optimizer = MinimumEigenOptimizer(vqe)\n",
    "\n",
    "# solve quadratic program\n",
    "result = vqe_optimizer.solve(qp)\n",
    "print(result)\n",
    "\n",
    "colors = ['r' if result.x[i] == 0 else 'c' for i in range(n)]\n",
    "draw_graph(G, colors, pos)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Traveling Salesman Problem\n",
    "\n",
    "In addition to being a notorious NP-complete problem that has drawn the attention of computer scientists and mathematicians for over two centuries, the Traveling Salesman Problem (TSP) has important bearings on finance and marketing, as its name suggests. Colloquially speaking, the traveling salesman is a person that goes from city to city to sell merchandise. The objective in this case is to find the shortest path that would enable the salesman to visit all the cities and return to its hometown, i.e. the city where he started traveling. By doing this, the salesman gets to maximize potential sales in the least amount of time. \n",
    "\n",
    "The problem derives its importance from its \"hardness\" and ubiquitous equivalence to other relevant combinatorial optimization problems that arise in practice.\n",
    " \n",
    "The mathematical formulation with some early analysis was proposed by W.R. Hamilton in the early 19th century. Mathematically the problem is, as in the case of Max-Cut, best abstracted in terms of graphs. The TSP on the nodes of a graph asks for the shortest *Hamiltonian cycle* that can be taken through each of the nodes. A Hamilton cycle is a closed path that uses every vertex of a graph once. The general solution is unknown and an algorithm that finds it efficiently (e.g., in polynomial time) is not expected to exist.\n",
    "\n",
    "Find the shortest Hamiltonian cycle in a graph $G=(V,E)$ with $n=|V|$ nodes and distances, $w_{ij}$ (distance from vertex $i$ to vertex $j$). A Hamiltonian cycle is described by $N^2$ variables $x_{i,p}$, where $i$ represents the node and $p$ represents its order in a prospective cycle. The decision variable takes the value 1 if the solution occurs at node $i$ at time order $p$. We require that every node can only appear once in the cycle, and for each time a node has to occur. This amounts to the two constraints (here and in the following, whenever not specified, the summands run over 0,1,...N-1)\n",
    "\n",
    "$$\\sum_{i} x_{i,p} = 1 ~~\\forall p$$\n",
    "$$\\sum_{p} x_{i,p} = 1 ~~\\forall i.$$\n",
    "\n",
    "For nodes in our prospective ordering, if $x_{i,p}$ and $x_{j,p+1}$ are both 1, then there should be an energy penalty if $(i,j) \\notin E$ (not connected in the graph). The form of this penalty is \n",
    "\n",
    "$$\\sum_{i,j\\notin E}\\sum_{p} x_{i,p}x_{j,p+1}>0,$$ \n",
    "\n",
    "where it is assumed the boundary condition of the Hamiltonian cycles $(p=N)\\equiv (p=0)$. However, here it will be assumed a fully connected graph and not include this term. The distance that needs to be minimized is \n",
    "\n",
    "$$C(\\textbf{x})=\\sum_{i,j}w_{ij}\\sum_{p} x_{i,p}x_{j,p+1}.$$\n",
    "\n",
    "Putting this all together in a single objective function to be minimized, we get the following:\n",
    "\n",
    "$$C(\\textbf{x})=\\sum_{i,j}w_{ij}\\sum_{p} x_{i,p}x_{j,p+1}+ A\\sum_p\\left(1- \\sum_i x_{i,p}\\right)^2+A\\sum_i\\left(1- \\sum_p x_{i,p}\\right)^2,$$\n",
    "\n",
    "where $A$ is a free parameter. One needs to ensure that $A$ is large enough so that these constraints are respected. One way to do this is to choose $A$ such that $A > \\mathrm{max}(w_{ij})$.\n",
    "\n",
    "Once again, it is easy to map the problem in this form to a quantum computer, and the solution will be found by minimizing a Ising Hamiltonian. "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {
    "tags": []
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "distance\n",
      " [[ 0. 48. 91.]\n",
      " [48.  0. 63.]\n",
      " [91. 63.  0.]]\n"
     ]
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAV0AAADnCAYAAAC9roUQAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuMCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy86wFpkAAAACXBIWXMAAAsTAAALEwEAmpwYAAAsF0lEQVR4nO3deVyVZf7/8dd94HAA5YAsyiIKauZSueSYuZRZata0/hpWFTIzTcd11FybQXLJtLRMMVIHNZZpqm+Zo1bmuGSZS5a5ZYgrIAiI7Ms5vz/OSC6sCuc+h/N5Ph48VG7OfT70yDeX131dn0sxGo0IIYQwD43aBQghhC2R0BVCCDOS0BVCCDOS0BVCCDOS0BVCCDOyr+6ip6enMSAg4NYLBgOcOQP5+aAooKlDdhsMpg93d/D1Nb1eCCEakQMHDmQajUavyq5VG7oBAQHs37//xk/m5UFYGFy5AgEBtxeaBoPp9b16wfLlYGdX93sIIYSFUhTlTFXX6ja9YDTC5Mnw66/g5nb7o1SNBlxd4T//gWXLbu8eQghhheoWups3wzff3FngVryzBvR6WLnSFOJCCGEDah+6xcUwaxY4OdXfPKy9veler71WP/cTQggLV/vQ3bbN9ODM0bF+K3BxgePH4ejR+r2vEEJYoNq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C131MlIVwjR+Hl5weDBf7RlrC8Gg2lXWkRErV8ioSuEsA3Tppl655aU1N89c3NhyJBqG5rfTEJXCGEbWrWCWbNMfXBrOb9brfx807bff/yjTi+T0BVC2I7wcHj+eVNLxjsJ3vx807TCmjWm5Wh1IKErhLAdGg0sWgShoaYdZIWFdXu90QjZ2aZpig0boJLmPTWptom5oigZwJk631UIIWxba6PRWOluiWpDVwghRP2S6QUhhDAjCV0hhDAjCV0hhDAjCV0hhDAjCV0hhDCj/w+x+Q+NQNPseAAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "# Generating a graph of 3 nodes\n",
    "n = 3\n",
    "num_qubits = n ** 2\n",
    "ins = tsp.random_tsp(n, seed=123)\n",
    "print('distance\\n', ins.w)\n",
    "\n",
    "# Draw the graph\n",
    "G = nx.Graph()\n",
    "G.add_nodes_from(np.arange(0, ins.dim, 1))\n",
    "colors = ['r' for node in G.nodes()]\n",
    "\n",
    "for i in range(0, ins.dim):\n",
    "    for j in range(i+1, ins.dim):\n",
    "        G.add_edge(i, j, weight=ins.w[i,j])\n",
    "\n",
    "pos = {k: v for k, v in enumerate(ins.coord)}\n",
    "\n",
    "draw_graph(G, colors, pos)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Brute force approach"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {
    "tags": []
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "order = (0, 1, 2) Distance = 202.0\n",
      "Best order from brute force = (0, 1, 2) with total distance = 202.0\n"
     ]
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAV0AAADnCAYAAAC9roUQAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuMCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy86wFpkAA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YrInbXvTvw6afA22/z7nbvDZ4VFZV3D5WX8+emybAdPRr44x9DUsOtTqErIvaXkAAMGQIMHgz89BPwww/A11+zP67LxaO9XbsCJ58MtGlj6ZXJCl0RcQ7DADp25NuAAVaPxifVdEVEQkihKyISQgpdEZEQUuiKiISQQldEJIQM089GYsMw9gLYGrrhiIg4QmvTNDN9PeA3dEVEJLBUXhARCSGFrohICCl0RURCSKErIhJCCl0RkRD6fxTIybakJQj2AAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "from itertools import permutations\n",
    "\n",
    "def brute_force_tsp(w, N):\n",
    "    a=list(permutations(range(1,N)))\n",
    "    last_best_distance = 1e10\n",
    "    for i in a:\n",
    "        distance = 0\n",
    "        pre_j = 0\n",
    "        for j in i:\n",
    "            distance = distance + w[j,pre_j]\n",
    "            pre_j = j\n",
    "        distance = distance + w[pre_j,0]\n",
    "        order = (0,) + i\n",
    "        if distance < last_best_distance:\n",
    "            best_order = order\n",
    "            last_best_distance = distance\n",
    "            print('order = ' + str(order) + ' Distance = ' + str(distance))\n",
    "    return last_best_distance, best_order\n",
    "  \n",
    "best_distance, best_order = brute_force_tsp(ins.w, ins.dim)\n",
    "print('Best order from brute force = ' + str(best_order) + ' with total distance = ' + str(best_distance))\n",
    "\n",
    "def draw_tsp_solution(G, order, colors, pos):\n",
    "    G2 = nx.DiGraph()\n",
    "    G2.add_nodes_from(G)\n",
    "    n = len(order)\n",
    "    for i in range(n):\n",
    "        j = (i + 1) % n\n",
    "        G2.add_edge(order[i], order[j], weight=G[order[i]][order[j]]['weight'])\n",
    "    default_axes = plt.axes(frameon=True)\n",
    "    nx.draw_networkx(G2, node_color=colors, edge_color='b', node_size=600, alpha=.8, ax=default_axes, pos=pos)\n",
    "    edge_labels = nx.get_edge_attributes(G2, 'weight')\n",
    "    nx.draw_networkx_edge_labels(G2, pos, font_color='b', edge_labels=edge_labels)\n",
    "    \n",
    "draw_tsp_solution(G, best_order, colors, pos)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Mapping to the Ising problem"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {
    "scrolled": true,
    "tags": []
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Offset: 600303.0\n",
      "Ising Hamiltonian:\n",
      "IIIIIIIIZ\t(-100069.5+0j)\n",
      "IIIIZIIII\t(-100055.5+0j)\n",
      "IIIIZIIIZ\t(12+0j)\n",
      "IIIIIIIZI\t(-100069.5+0j)\n",
      "IIIZIIIII\t(-100055.5+0j)\n",
      "IIIZIIIZI\t(12+0j)\n",
      "IIIIIIZII\t(-100069.5+0j)\n",
      "IIIIIZIII\t(-100055.5+0j)\n",
      "IIIIIZZII\t(12+0j)\n",
      "IZIIIIIII\t(-100077+0j)\n",
      "IZIIIIIIZ\t(22.75+0j)\n",
      "ZIIIIIIII\t(-100077+0j)\n",
      "ZIIIIIIZI\t(22.75+0j)\n",
      "IIZIIIIII\t(-100077+0j)\n",
      "IIZIIIZII\t(22.75+0j)\n",
      "IIIIIZIZI\t(12+0j)\n",
      "IIIIZIZII\t(12+0j)\n",
      "IIIZIIIIZ\t(12+0j)\n",
      "IZIIIZIII\t(15.75+0j)\n",
      "ZIIIZIIII\t(15.75+0j)\n",
      "IIZZIIIII\t(15.75+0j)\n",
      "IIZIIIIZI\t(22.75+0j)\n",
      "IZIIIIZII\t(22.75+0j)\n",
      "ZIIIIIIIZ\t(22.75+0j)\n",
      "IIZIZIIII\t(15.75+0j)\n",
      "IZIZIIIII\t(15.75+0j)\n",
      "ZIIIIZIII\t(15.75+0j)\n",
      "IIIIIZIIZ\t(50000+0j)\n",
      "IIZIIIIIZ\t(50000+0j)\n",
      "IIZIIZIII\t(50000+0j)\n",
      "IIIIZIIZI\t(50000+0j)\n",
      "IZIIIIIZI\t(50000+0j)\n",
      "IZIIZIIII\t(50000+0j)\n",
      "IIIZIIZII\t(50000+0j)\n",
      "ZIIIIIZII\t(50000+0j)\n",
      "ZIIZIIIII\t(50000+0j)\n",
      "IIIIIIIZZ\t(50000+0j)\n",
      "IIIIIIZIZ\t(50000+0j)\n",
      "IIIIIIZZI\t(50000+0j)\n",
      "IIIIZZIII\t(50000+0j)\n",
      "IIIZIZIII\t(50000+0j)\n",
      "IIIZZIIII\t(50000+0j)\n",
      "IZZIIIIII\t(50000+0j)\n",
      "ZIZIIIIII\t(50000+0j)\n",
      "ZZIIIIIII\t(50000+0j)\n",
      "\n"
     ]
    }
   ],
   "source": [
    "qubitOp, offset = tsp.get_operator(ins)\n",
    "print('Offset:', offset)\n",
    "print('Ising Hamiltonian:')\n",
    "print(qubitOp.print_details())"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "metadata": {
    "tags": []
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "// This file has been generated by DOcplex\n",
      "// model name is: AnonymousModel\n",
      "// single vars section\n",
      "dvar bool x_0;\n",
      "dvar bool x_1;\n",
      "dvar bool x_2;\n",
      "dvar bool x_3;\n",
      "dvar bool x_4;\n",
      "dvar bool x_5;\n",
      "dvar bool x_6;\n",
      "dvar bool x_7;\n",
      "dvar bool x_8;\n",
      "\n",
      "minimize\n",
      " - 200000 x_0 - 200000 x_1 - 200000 x_2 - 200000 x_3 - 200000 x_4 - 200000 x_5\n",
      " - 200000 x_6 - 200000 x_7 - 200000 x_8 [ 200000 x_0*x_1 + 200000 x_0*x_2\n",
      " + 200000 x_0*x_3 + 48 x_0*x_4 + 48 x_0*x_5 + 200000 x_0*x_6 + 91 x_0*x_7\n",
      " + 91 x_0*x_8 + 200000 x_1*x_2 + 48 x_1*x_3 + 200000 x_1*x_4 + 48 x_1*x_5\n",
      " + 91 x_1*x_6 + 200000 x_1*x_7 + 91 x_1*x_8 + 48 x_2*x_3 + 48 x_2*x_4\n",
      " + 200000 x_2*x_5 + 91 x_2*x_6 + 91 x_2*x_7 + 200000 x_2*x_8 + 200000 x_3*x_4\n",
      " + 200000 x_3*x_5 + 200000 x_3*x_6 + 63 x_3*x_7 + 63 x_3*x_8 + 200000 x_4*x_5\n",
      " + 63 x_4*x_6 + 200000 x_4*x_7 + 63 x_4*x_8 + 63 x_5*x_6 + 63 x_5*x_7\n",
      " + 200000 x_5*x_8 + 200000 x_6*x_7 + 200000 x_6*x_8 + 200000 x_7*x_8 ] +\n",
      " 600000;\n",
      " \n",
      "subject to {\n",
      "\n",
      "}\n"
     ]
    }
   ],
   "source": [
    "qp = QuadraticProgram()\n",
    "qp.from_ising(qubitOp, offset, linear=True)\n",
    "qp.to_docplex().prettyprint()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "metadata": {
    "tags": []
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "optimal function value: 202.0\n",
      "optimal value: [1. 0. 0. 0. 1. 0. 0. 0. 1.]\n",
      "status: SUCCESS\n"
     ]
    }
   ],
   "source": [
    "result = exact.solve(qp)\n",
    "print(result)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Checking that the full Hamiltonian gives the right cost "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "metadata": {
    "tags": []
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "energy: -600101.0\n",
      "tsp objective: 202.0\n",
      "feasible: True\n",
      "solution: [0, 1, 2]\n",
      "solution objective: 202.0\n"
     ]
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAV0AAADnCAYAAAC9roUQAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuMCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy86wFpkAAAACXBIWXMAAAsTAAALEwEAmpwYAAAj30lEQVR4nO3dd3xUVd4G8OdOeoeQQBJaKCKgIrCIyosNFHUtH5ZVBFR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O9XbsCJ58MtGlj6ZXJCl0RcQ7DADp25NuAAVaPxifVdEVEQkihKyISQgpdEZEQUuiKiISQQldEJIQM089GYsMw9gLYGrrhiIg4QmvTNDN9PeA3dEVEJLBUXhARCSGFrohICCl0RURCSKErIhJCCl0RkRD6fxTIybakJQj2AAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "#Making the Hamiltonian in its full form and getting the lowest eigenvalue and eigenvector\n",
    "ee = NumPyMinimumEigensolver(qubitOp)\n",
    "result = ee.run()\n",
    "\n",
    "print('energy:', result.eigenvalue.real)\n",
    "print('tsp objective:', result.eigenvalue.real + offset)\n",
    "x = sample_most_likely(result.eigenstate)\n",
    "print('feasible:', tsp.tsp_feasible(x))\n",
    "z = tsp.get_tsp_solution(x)\n",
    "print('solution:', z)\n",
    "print('solution objective:', tsp.tsp_value(z, ins.w))\n",
    "draw_tsp_solution(G, z, colors, pos)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Running it on quantum computer\n",
    "We run the optimization routine using a feedback loop with a quantum computer that uses trial functions built with Y single-qubit rotations, $U_\\mathrm{single}(\\theta) = \\prod_{i=1}^n Y(\\theta_{i})$, and entangler steps $U_\\mathrm{entangler}$."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "metadata": {},
   "outputs": [],
   "source": [
    "aqua_globals.random_seed = np.random.default_rng(123)\n",
    "seed = 10598\n",
    "backend = Aer.get_backend('statevector_simulator')\n",
    "quantum_instance = QuantumInstance(backend, seed_simulator=seed, seed_transpiler=seed)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 19,
   "metadata": {
    "tags": []
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "energy: -587129.7995590203\n",
      "time: 16.47167682647705\n",
      "feasible: True\n",
      "solution: [1, 2, 0]\n",
      "solution objective: 202.0\n"
     ]
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAV0AAADnCAYAAAC9roUQAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuMCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy86wFpkAAAACXBIWXMAAAsTAAALEwEAmpwYAAAj30lEQVR4nO3dd3xUVd4G8OdOeoeQQBJaKCKgIrCIyosNFHUtH5ZVBFRA5QVcFUUEFV3ssqIsgqCCrAVssLa1i8jLggpLURFLBEFqCL2mTZK57x+PY2J2MknIzNy5d57v55MPkCGTQ8mTM79zzu8YpmlCRERCw2X1AEREIolCV0QkhBS6IiIhpNAVEQkhha6ISAhF+3swIyPDzM3NDdFQREScYe3atftM08z09Zjf0M3NzcWaNWuCMyoREYcyDGNrTY+pvCAiEkIKXRGREFLoioiEkEJXRCSE/C6khUR5ObB5M5CXBxQUAGVlQEoK0L490LEjkJ5u9QhFRALGutDdtg145RW+lZUBpgm43fwxKgqIjWUgn3wyMGoU0Lcv3yciYmOhD93SUmD6dOC55wCPB0hK4szWF9MEfvwRGDMGaN4cmDED6NIltOMVEQmg0NZ0d+wALr4YmD2bYdu4sf/Zq2EwkNPSgPx8YMAA4OmnGcYiIjYUupnuzp0MzYMHGbb1lZrKcsPUqUBxMTBuXODHKCISZKGZ6brdwNChDNy0tON/nuhohu/TTwPvvhu48YmIhEhoQnf6dGDLloYFrldUFJCQANxzD7BnT8OfT0QkhIIfutu3c9GspsWy4xEfDxQVAVOmBO45RURCIPih+9prQEUFSwOBlJoKvPceSxYiIjYR3ND1eID587lTwQ+3x4MH8/Nx6c8/4+yffsKQzZvx5bFj/p87Koph/uGHARywiEhwBTd0t2zhvtxaDjVUAMiKicGcVq2wtEMH3JiZibt27kS+2+3/+Q0DWL48YMMVEQm24G4Zy8tjMNYiweXCyMzKfr9npaQgJyYGeSUlyPEX2PHxwDffBGCgIiKhEdzQ3b2b28XqyARQ5gaOucqxze1G27g4/x8QEwPs3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lJQV48slfN+XWvqhWK7ebs9vp0+tcL24Iha6I2E+vXsAdd3CG2pDgdbtZqpgypeYjcgGmhTQRsadRo3iQ4fHH+WN92peZJgPbMIAnngD69w/aMKvTTFdE7MkwgJEjeWVPZibv8ikqYqDWxDTZsPzwYdZw338/pIELaKYrInbXvTvw6afA22/z7nbvDZ4VFZV3D5WX8+emybAdPRr44x9DUsOtTqErIvaXkAAMGQIMHgz89BPwww/A11+zP67LxaO9XbsCJ58MtGlj6ZXJCl0RcQ7DADp25NuAAVaPxifVdEVEQkihKyISQgpdEZEQUuiKiISQQldEJIQM089GYsMw9gLYGrrhiIg4QmvTNDN9PeA3dEVEJLBUXhARCSGFrohICCl0RURCSKErIhJCCl0RkRD6fxTIybakJQj2AAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "spsa = SPSA(maxiter=300)\n",
    "ry = TwoLocal(qubitOp.num_qubits, 'ry', 'cz', reps=5, entanglement='linear')\n",
    "vqe = VQE(qubitOp, ry, spsa, quantum_instance=quantum_instance)\n",
    "\n",
    "result = vqe.run(quantum_instance)\n",
    "\n",
    "print('energy:', result.eigenvalue.real)\n",
    "print('time:', result.optimizer_time)\n",
    "x = sample_most_likely(result.eigenstate)\n",
    "print('feasible:', tsp.tsp_feasible(x))\n",
    "z = tsp.get_tsp_solution(x)\n",
    "print('solution:', z)\n",
    "print('solution objective:', tsp.tsp_value(z, ins.w))\n",
    "draw_tsp_solution(G, z, colors, pos)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 20,
   "metadata": {},
   "outputs": [],
   "source": [
    "aqua_globals.random_seed = np.random.default_rng(123)\n",
    "seed = 10598\n",
    "backend = Aer.get_backend('statevector_simulator')\n",
    "quantum_instance = QuantumInstance(backend, seed_simulator=seed, seed_transpiler=seed)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 21,
   "metadata": {
    "tags": []
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "optimal function value: 202.0\n",
      "optimal value: [0. 0. 1. 0. 1. 0. 1. 0. 0.]\n",
      "status: SUCCESS\n",
      "solution: [1, 2, 0]\n",
      "solution objective: 202.0\n"
     ]
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAV0AAADnCAYAAAC9roUQAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuMCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy86wFpkAAAACXBIWXMAAAsTAAALEwEAmpwYAAAj30lEQVR4nO3dd3xUVd4G8OdOeoeQQBJaKCKgIrCIyosNFHUtH5ZVBFRA5QVcFUUEFV3ssqIsgqCCrAVssLa1i8jLggpLURFLBEFqCL2mTZK57x+PY2J2MknIzNy5d57v55MPkCGTQ8mTM79zzu8YpmlCRERCw2X1AEREIolCV0QkhBS6IiIhpNAVEQkhha6ISAhF+3swIyPDzM3NDdFQREScYe3atftM08z09Zjf0M3NzcWaNWuCMyoREYcyDGNrTY+pvCAiEkIKXRGREFLoioiEkEJXRCSE/C6khUR5ObB5M5CXBxQUAGVlQEoK0L490LEjkJ5u9QhFRALGutDdtg145RW+lZUBpgm43fwxKgqIjWUgn3wyMGoU0Lcv3yciYmOhD93SUmD6dOC55wCPB0hK4szWF9MEfvwRGDMGaN4cmDED6NIltOMVEQmg0NZ0d+wALr4YmD2bYdu4sf/Zq2EwkNPSgPx8YMAA4OmnGcYiIjYUupnuzp0MzYMHGbb1lZrKcsPUqUBxMTBuXODHKCISZKGZ6brdwNChDNy0tON/nuhohu/TTwPvvhu48YmIhEhoQnf6dGDLloYFrldUFJCQANxzD7BnT8OfT0QkhIIfutu3c9GspsWy4xEfDxQVAVOmBO45RURCIPih+9prQEUFSwOBlJoKvPceSxYiIjYR3ND1eID587lTwQ+3x4MH8/Nx6c8/4+yffsKQzZvx5bFj/p87Koph/uGHARywiEhwBTd0t2zhv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DBkzcuRN3Z2X5n+maJt98bbsIINV0RcQ+Tj+dx3RLS2vtCJ8aFYWpLVvW/bkLC9nB/oQTGjhI/zTTFRH7iI4GbriB+8oCyTRZthg1Kui9MRW6ImIvQ4cCTZpwZhooR44A7dsDl10WuOesgUJXROwlJQV48slfN+XWvqhWK7ebs9vp0+tcL24Iha6I2E+vXsAdd3CG2pDgdbtZqpgypeYjcgGmhTQRsadRo3iQ4fHH+WN92peZJgPbMIAnngD69w/aMKvTTFdE7MkwgJEjeWVPZibv8ikqYqDWxDTZsPzwYdZw338/pIELaKYrInbXvTvw6afA22/z7nbvDZ4VFZV3D5WX8+emybAdPRr44x9DUsOtTqErIvaXkAAMGQIMHgz89BPwww/A11+zP67LxaO9XbsCJ58MtGlj6ZXJCl0RcQ7DADp25NuAAVaPxifVdEVEQkihKyISQgpdEZEQUuiKiISQQldEJIQM089GYsMw9gLYGrrhiIg4QmvTNDN9PeA3dEVEJLBUXhARCSGFrohICCl0RURCSKErIhJCCl0RkRD6fxTIybakJQj2AAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "# create minimum eigen optimizer based on VQE\n",
    "vqe_optimizer = MinimumEigenOptimizer(vqe)\n",
    "\n",
    "# solve quadratic program\n",
    "result = vqe_optimizer.solve(qp)\n",
    "print(result)\n",
    "\n",
    "z = tsp.get_tsp_solution(x)\n",
    "print('solution:', z)\n",
    "print('solution objective:', tsp.tsp_value(z, ins.w))\n",
    "draw_tsp_solution(G, z, colors, pos)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 22,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2019-08-22T01:58:30.581695Z",
     "start_time": "2019-08-22T01:58:30.574381Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<h3>Version Information</h3><table><tr><th>Qiskit Software</th><th>Version</th></tr><tr><td>Qiskit</td><td>0.20.1</td></tr><tr><td>Terra</td><td>0.15.2</td></tr><tr><td>Aer</td><td>0.6.1</td></tr><tr><td>Ignis</td><td>0.4.0</td></tr><tr><td>Aqua</td><td>0.7.5</td></tr><tr><td>IBM Q Provider</td><td>0.8.0</td></tr><tr><th>System information</th></tr><tr><td>Python</td><td>3.8.5 | packaged by conda-forge | (default, Jul 31 2020, 02:39:48) \n",
       "[GCC 7.5.0]</td></tr><tr><td>OS</td><td>Linux</td></tr><tr><td>CPUs</td><td>4</td></tr><tr><td>Memory (Gb)</td><td>30.820919036865234</td></tr><tr><td colspan='2'>Mon Sep 21 11:40:13 2020 EDT</td></tr></table>"
      ],
      "text/plain": [
       "<IPython.core.display.HTML object>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "text/html": [
       "<div style='width: 100%; background-color:#d5d9e0;padding-left: 10px; padding-bottom: 10px; padding-right: 10px; padding-top: 5px'><h3>This code is a part of Qiskit</h3><p>&copy; Copyright IBM 2017, 2020.</p><p>This code is licensed under the Apache License, Version 2.0. You may<br>obtain a copy of this license in the LICENSE.txt file in the root directory<br> of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.<p>Any modifications or derivative works of this code must retain this<br>copyright notice, and modified files need to carry a notice indicating<br>that they have been altered from the originals.</p></div>"
      ],
      "text/plain": [
       "<IPython.core.display.HTML object>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "import qiskit.tools.jupyter\n",
    "%qiskit_version_table\n",
    "%qiskit_copyright"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "anaconda-cloud": {},
  "celltoolbar": "Tags",
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.4"
  },
  "varInspector": {
   "cols": {
    "lenName": 16,
    "lenType": 16,
    "lenVar": 40
   },
   "kernels_config": {
    "python": {
     "delete_cmd_postfix": "",
     "delete_cmd_prefix": "del ",
     "library": "var_list.py",
     "varRefreshCmd": "print(var_dic_list())"
    },
    "r": {
     "delete_cmd_postfix": ") ",
     "delete_cmd_prefix": "rm(",
     "library": "var_list.r",
     "varRefreshCmd": "cat(var_dic_list()) "
    }
   },
   "types_to_exclude": [
    "module",
    "function",
    "builtin_function_or_method",
    "instance",
    "_Feature"
   ],
   "window_display": false
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
